package cn.lyjuan.payment.third.http.api.swagger;

import com.mangofactory.swagger.configuration.SpringSwaggerConfig;
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by yuananyun on 2015/11/24.
 */
@Configuration
@EnableSwagger2
public class SwaggerConfig
{


    @Bean
    public Docket addUserDocket()
    {
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        ApiInfo apiInfo = new ApiInfo(
                "支付聚合",
                "整合第三方支付",
                "0.0.1",
                "https://www.lyjuan.cn/",
                "li17206@163.com",
                "PUBLIC",
                "");
        docket.apiInfo(apiInfo);
        Set<String> protocols = new HashSet<>();
        protocols.add("http");
        docket.protocols(protocols).host("localhost:9090");
//        docket.host("localhost:9090");
        return docket;
    }
}
